function isMobilePhone() {
    if (navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)) {
        return true;
    } else {
        return false;
    }
}
/****************************************************/
$(function() {
    if(isMobilePhone()){
            swiper1 = new Swiper('.xn-page-progdlist', {
            slidesPerView: 1,
            spaceBetween: 20,
            pagination: {
                el: '.xn-page-progdlist .swiper-pagination',
            },
            navigation: {
                nextEl: '.xn-page-progdlist .swiper-button-next',
                prevEl: '.xn-page-progdlist .swiper-button-prev',
            },
        });
    }else{
            swiper1 = new Swiper('.xn-page-progdlist', {
            slidesPerView: 4,
            slidesPerGroup:4,
            spaceBetween: 20,
            pagination: {
                el: '.xn-page-progdlist .swiper-pagination',
            },
            navigation: {
                nextEl: '.xn-page-progdlist .swiper-button-next',
                prevEl: '.xn-page-progdlist .swiper-button-prev',
            },
        });
    }
    $(".xn-page-proleft").click(function(){
		swiper1.slidePrev();
	});
	$(".xn-page-proright").click(function(){
		swiper1.slideNext();
	});
});